<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/4/27
 * Time: 15:27
 */
namespace app\validate;
class ArticleValidate{
    protected $rule = [
        'title'     =>  'require',
        'type_id'  =>  'require',
    ];
    protected $message   =   [
        'title.require'   => '文章标题必须填写',
        'type_id.require' => '栏目必须填写',
    ];
    public function articleValidate(){
        $validate['rule']    = $this->rule;
        $validate['message'] = $this->message;
        return $validate;
    }
}